\(\int (-1-\cot ^2(x))^{3/2} \, dx\) [11]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [C] (verification not implemented)
   Sympy [F]
   Maxima [B] (verification not implemented)
   Giac [C] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 12, antiderivative size = 35 \[ \int \left (-1-\cot ^2(x)\right )^{3/2} \, dx=-\frac {1}{2} \arctan \left (\frac {\cot (x)}{\sqrt {-\csc ^2(x)}}\right )+\frac {1}{2} \cot (x) \sqrt {-\csc ^2(x)} \]

[Out]

-1/2*arctan(cot(x)/(-csc(x)^2)^(1/2))+1/2*cot(x)*(-csc(x)^2)^(1/2)

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.417, Rules used = {3738, 4207, 201, 223, 209} \[ \int \left (-1-\cot ^2(x)\right )^{3/2} \, dx=\frac {1}{2} \cot (x) \sqrt {-\csc ^2(x)}-\frac {1}{2} \arctan \left (\frac {\cot (x)}{\sqrt {-\csc ^2(x)}}\right ) \]

[In]

Int[(-1 - Cot[x]^2)^(3/2),x]

[Out]

-1/2*ArcTan[Cot[x]/Sqrt[-Csc[x]^2]] + (Cot[x]*Sqrt[-Csc[x]^2])/2

Rule 201

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[x*((a + b*x^n)^p/(n*p + 1)), x] + Dist[a*n*(p/(n*p + 1)),
 Int[(a + b*x^n)^(p - 1), x], x] /; FreeQ[{a, b}, x] && IGtQ[n, 0] && GtQ[p, 0] && (IntegerQ[2*p] || (EqQ[n, 2
] && IntegerQ[4*p]) || (EqQ[n, 2] && IntegerQ[3*p]) || LtQ[Denominator[p + 1/n], Denominator[p]])

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 223

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 3738

Int[(u_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Int[ActivateTrig[u*(a*sec[e + f*x]^2)^p]
, x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a, b]

Rule 4207

Int[((b_.)*sec[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[b*(ff/
f), Subst[Int[(b + b*ff^2*x^2)^(p - 1), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{b, e, f, p}, x] &&  !IntegerQ[p
]

Rubi steps \begin{align*} \text {integral}& = \int \left (-\csc ^2(x)\right )^{3/2} \, dx \\ & = \text {Subst}\left (\int \sqrt {-1-x^2} \, dx,x,\cot (x)\right ) \\ & = \frac {1}{2} \cot (x) \sqrt {-\csc ^2(x)}-\frac {1}{2} \text {Subst}\left (\int \frac {1}{\sqrt {-1-x^2}} \, dx,x,\cot (x)\right ) \\ & = \frac {1}{2} \cot (x) \sqrt {-\csc ^2(x)}-\frac {1}{2} \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\frac {\cot (x)}{\sqrt {-\csc ^2(x)}}\right ) \\ & = -\frac {1}{2} \arctan \left (\frac {\cot (x)}{\sqrt {-\csc ^2(x)}}\right )+\frac {1}{2} \cot (x) \sqrt {-\csc ^2(x)} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.11 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.37 \[ \int \left (-1-\cot ^2(x)\right )^{3/2} \, dx=-\frac {\csc \left (\frac {x}{2}\right ) \left (\cot (x) \csc (x)+\log \left (\cos \left (\frac {x}{2}\right )\right )-\log \left (\sin \left (\frac {x}{2}\right )\right )\right ) \sec \left (\frac {x}{2}\right )}{4 \sqrt {-\csc ^2(x)}} \]

[In]

Integrate[(-1 - Cot[x]^2)^(3/2),x]

[Out]

-1/4*(Csc[x/2]*(Cot[x]*Csc[x] + Log[Cos[x/2]] - Log[Sin[x/2]])*Sec[x/2])/Sqrt[-Csc[x]^2]

Maple [A] (verified)

Time = 0.04 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.91

method result size
derivativedivides \(\frac {\cot \left (x \right ) \sqrt {-1-\cot \left (x \right )^{2}}}{2}-\frac {\arctan \left (\frac {\cot \left (x \right )}{\sqrt {-1-\cot \left (x \right )^{2}}}\right )}{2}\) \(32\)
default \(\frac {\cot \left (x \right ) \sqrt {-1-\cot \left (x \right )^{2}}}{2}-\frac {\arctan \left (\frac {\cot \left (x \right )}{\sqrt {-1-\cot \left (x \right )^{2}}}\right )}{2}\) \(32\)
risch \(\frac {i \sqrt {\frac {{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}-1\right )^{2}}}\, \left ({\mathrm e}^{2 i x}+1\right )}{{\mathrm e}^{2 i x}-1}-\sqrt {\frac {{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}-1\right )^{2}}}\, \ln \left ({\mathrm e}^{i x}-1\right ) \sin \left (x \right )+\sqrt {\frac {{\mathrm e}^{2 i x}}{\left ({\mathrm e}^{2 i x}-1\right )^{2}}}\, \ln \left ({\mathrm e}^{i x}+1\right ) \sin \left (x \right )\) \(95\)

[In]

int((-1-cot(x)^2)^(3/2),x,method=_RETURNVERBOSE)

[Out]

1/2*cot(x)*(-1-cot(x)^2)^(1/2)-1/2*arctan(cot(x)/(-1-cot(x)^2)^(1/2))

Fricas [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.27 (sec) , antiderivative size = 73, normalized size of antiderivative = 2.09 \[ \int \left (-1-\cot ^2(x)\right )^{3/2} \, dx=\frac {{\left (-i \, e^{\left (4 i \, x\right )} + 2 i \, e^{\left (2 i \, x\right )} - i\right )} \log \left (e^{\left (i \, x\right )} + 1\right ) + {\left (i \, e^{\left (4 i \, x\right )} - 2 i \, e^{\left (2 i \, x\right )} + i\right )} \log \left (e^{\left (i \, x\right )} - 1\right ) + 2 i \, e^{\left (3 i \, x\right )} + 2 i \, e^{\left (i \, x\right )}}{2 \, {\left (e^{\left (4 i \, x\right )} - 2 \, e^{\left (2 i \, x\right )} + 1\right )}} \]

[In]

integrate((-1-cot(x)^2)^(3/2),x, algorithm="fricas")

[Out]

1/2*((-I*e^(4*I*x) + 2*I*e^(2*I*x) - I)*log(e^(I*x) + 1) + (I*e^(4*I*x) - 2*I*e^(2*I*x) + I)*log(e^(I*x) - 1)
+ 2*I*e^(3*I*x) + 2*I*e^(I*x))/(e^(4*I*x) - 2*e^(2*I*x) + 1)

Sympy [F]

\[ \int \left (-1-\cot ^2(x)\right )^{3/2} \, dx=\int \left (- \cot ^{2}{\left (x \right )} - 1\right )^{\frac {3}{2}}\, dx \]

[In]

integrate((-1-cot(x)**2)**(3/2),x)

[Out]

Integral((-cot(x)**2 - 1)**(3/2), x)

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 284 vs. \(2 (27) = 54\).

Time = 0.39 (sec) , antiderivative size = 284, normalized size of antiderivative = 8.11 \[ \int \left (-1-\cot ^2(x)\right )^{3/2} \, dx=\frac {{\left (2 \, {\left (2 \, \cos \left (2 \, x\right ) - 1\right )} \cos \left (4 \, x\right ) - \cos \left (4 \, x\right )^{2} - 4 \, \cos \left (2 \, x\right )^{2} - \sin \left (4 \, x\right )^{2} + 4 \, \sin \left (4 \, x\right ) \sin \left (2 \, x\right ) - 4 \, \sin \left (2 \, x\right )^{2} + 4 \, \cos \left (2 \, x\right ) - 1\right )} \arctan \left (\sin \left (x\right ), \cos \left (x\right ) + 1\right ) - {\left (2 \, {\left (2 \, \cos \left (2 \, x\right ) - 1\right )} \cos \left (4 \, x\right ) - \cos \left (4 \, x\right )^{2} - 4 \, \cos \left (2 \, x\right )^{2} - \sin \left (4 \, x\right )^{2} + 4 \, \sin \left (4 \, x\right ) \sin \left (2 \, x\right ) - 4 \, \sin \left (2 \, x\right )^{2} + 4 \, \cos \left (2 \, x\right ) - 1\right )} \arctan \left (\sin \left (x\right ), \cos \left (x\right ) - 1\right ) + 2 \, {\left (\sin \left (3 \, x\right ) + \sin \left (x\right )\right )} \cos \left (4 \, x\right ) - 2 \, {\left (\cos \left (3 \, x\right ) + \cos \left (x\right )\right )} \sin \left (4 \, x\right ) - 2 \, {\left (2 \, \cos \left (2 \, x\right ) - 1\right )} \sin \left (3 \, x\right ) + 4 \, \cos \left (3 \, x\right ) \sin \left (2 \, x\right ) + 4 \, \cos \left (x\right ) \sin \left (2 \, x\right ) - 4 \, \cos \left (2 \, x\right ) \sin \left (x\right ) + 2 \, \sin \left (x\right )}{2 \, {\left (2 \, {\left (2 \, \cos \left (2 \, x\right ) - 1\right )} \cos \left (4 \, x\right ) - \cos \left (4 \, x\right )^{2} - 4 \, \cos \left (2 \, x\right )^{2} - \sin \left (4 \, x\right )^{2} + 4 \, \sin \left (4 \, x\right ) \sin \left (2 \, x\right ) - 4 \, \sin \left (2 \, x\right )^{2} + 4 \, \cos \left (2 \, x\right ) - 1\right )}} \]

[In]

integrate((-1-cot(x)^2)^(3/2),x, algorithm="maxima")

[Out]

1/2*((2*(2*cos(2*x) - 1)*cos(4*x) - cos(4*x)^2 - 4*cos(2*x)^2 - sin(4*x)^2 + 4*sin(4*x)*sin(2*x) - 4*sin(2*x)^
2 + 4*cos(2*x) - 1)*arctan2(sin(x), cos(x) + 1) - (2*(2*cos(2*x) - 1)*cos(4*x) - cos(4*x)^2 - 4*cos(2*x)^2 - s
in(4*x)^2 + 4*sin(4*x)*sin(2*x) - 4*sin(2*x)^2 + 4*cos(2*x) - 1)*arctan2(sin(x), cos(x) - 1) + 2*(sin(3*x) + s
in(x))*cos(4*x) - 2*(cos(3*x) + cos(x))*sin(4*x) - 2*(2*cos(2*x) - 1)*sin(3*x) + 4*cos(3*x)*sin(2*x) + 4*cos(x
)*sin(2*x) - 4*cos(2*x)*sin(x) + 2*sin(x))/(2*(2*cos(2*x) - 1)*cos(4*x) - cos(4*x)^2 - 4*cos(2*x)^2 - sin(4*x)
^2 + 4*sin(4*x)*sin(2*x) - 4*sin(2*x)^2 + 4*cos(2*x) - 1)

Giac [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.27 (sec) , antiderivative size = 34, normalized size of antiderivative = 0.97 \[ \int \left (-1-\cot ^2(x)\right )^{3/2} \, dx=-\frac {1}{4} \, {\left (\frac {2 i \, \cos \left (x\right )}{\cos \left (x\right )^{2} - 1} - i \, \log \left (\cos \left (x\right ) + 1\right ) + i \, \log \left (-\cos \left (x\right ) + 1\right )\right )} \mathrm {sgn}\left (\sin \left (x\right )\right ) \]

[In]

integrate((-1-cot(x)^2)^(3/2),x, algorithm="giac")

[Out]

-1/4*(2*I*cos(x)/(cos(x)^2 - 1) - I*log(cos(x) + 1) + I*log(-cos(x) + 1))*sgn(sin(x))

Mupad [B] (verification not implemented)

Time = 13.02 (sec) , antiderivative size = 31, normalized size of antiderivative = 0.89 \[ \int \left (-1-\cot ^2(x)\right )^{3/2} \, dx=\frac {\mathrm {cot}\left (x\right )\,\sqrt {-{\mathrm {cot}\left (x\right )}^2-1}}{2}-\frac {\mathrm {atan}\left (\frac {\mathrm {cot}\left (x\right )}{\sqrt {-{\mathrm {cot}\left (x\right )}^2-1}}\right )}{2} \]

[In]

int((- cot(x)^2 - 1)^(3/2),x)

[Out]

(cot(x)*(- cot(x)^2 - 1)^(1/2))/2 - atan(cot(x)/(- cot(x)^2 - 1)^(1/2))/2